from django.db import models


# Create your models here.
class Teacher(models.Model):
    teacher_id = models.CharField("工号", max_length=20, primary_key=True)
    name = models.CharField("姓名", max_length=50)
    gender = models.CharField("性别", max_length=1)
    id_card = models.CharField("身份证号", max_length=18, unique=True)
    college = models.ForeignKey('classapp.College', on_delete=models.CASCADE)
    position = models.CharField("职位", max_length=50)
    photo = models.ImageField("照片", upload_to="teachers/")


class Position(models.Model):
    name = models.CharField("职位", max_length=20)
